package cn.source.zk.mapper;

import cn.source.zk.domain.dto.SettingQueryFieldsDTO;
import cn.source.zk.domain.entity.ZkSettingQueryFields;
import cn.source.zk.domain.vo.ZkSettingQueryFieldsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author shiqi
 * @create 2025-04-18 14:24
 */
@Mapper
public interface ZkSettingQueryFieldsMapper {

    List<ZkSettingQueryFieldsVO> listPage(SettingQueryFieldsDTO dto);

    /**
     * 新增字段查询
     * @param zkSettingQueryFields
     */
    void add(ZkSettingQueryFields zkSettingQueryFields);

    /**
     * 编辑字段查询
     * @param zkSettingQueryFields
     */
    void edit(ZkSettingQueryFields zkSettingQueryFields);

    /**
     * 删除字段查询
     * @param id
     */
    void del(@Param("id") Integer id);

    /**
     * 字段名称和表标识的map集合[{字段名：值}]
     * @return
     */
    // @Select("SELECT field_name,table_prefix FROM zk_setting_query_fields")
    List<Map<String, Object>> queryTableData();

    /**
     * 字段名称和字段中文名称map集合[{字段名：值}]
     * @return
     */
    List<Map<String, Object>> getFieldAndFieldCn();

    /**
     * 根据id查询字段查询
     * @param id
     * @return
     */
    ZkSettingQueryFields getSettingQueryFieldsById(@Param("id") Integer id);

    /**
     * 获取电流谐波数据
     * @return
     */
    List<ZkSettingQueryFieldsVO> getIhrData(SettingQueryFieldsDTO dto);

}
